In a lathe or the like which has two main spindles, it is known to cause the main spindles to rotate at the same speed, where required. For example, the two main spindles are rotated at the same speed so that the workpiece can be smoothly delivered therebetween, when a shift is made from a state in which one end portion of a workpiece is held by a first chuck coupled to one main spindle of the lathe to a state in which the other end portion of the workpiece is held by a second chuck coupled to the other main spindle (i.e., at the time of workpiece delivery). In case that a workpiece having a shape which is anisotropic with respect to the workpiece axis is delivered from the first chuck to the second chuck, however, the workpiece sometimes may run against the second chuck to be damaged or deformed when the respective rotational phases (rotational angle positions) of the two chucks are different, even if these chucks are rotating at the same speed.
In order to eliminate such an awkward situation, the inventor hereof proposed a main spindle rotation control method in which two main spindles are rotated at the same speed and in the same phase (see, Japanese Patent Application No. 1-192751 and its equivalent International Patent Application No. PCT/JP90/00506). According to this proposed method, when the two main spindles are brought to rotate at the same synchronous rotating speed under speed control in accordance with a synchronous speed command, a positional deviation amount corresponding to the synchronous rotating speed is calculated on the basis of the synchronous speed command, and the calculated amount is set in each of positional deviation counters associated with the two main spindles. Thereafter, position control is performed for each of the main spindles in response to a move command corresponding to the synchronous rotating speed and a position feedback signal from a position sensor of each or the two main spindles. Then, a value corresponding to a rotational angle covered after the point of time when a one-revolution signal is generated from each position sensor is subtracted from each corresponding positional error counter. As a result, each main spindle is driven to be decelerated, and the two main spindles are brought to rotate in the same phase. Next, the two main spindles are subjected again to the speed loop control performed in accordance with the synchronous speed command, so that the main spindles rotate in the same phase and at the same speed.
While both the main spindles are being rotated, using either one of the rotation control methods described above, in accordance with the synchronous speed command common to the two main spindles and the position feedback signals supplied from the two position sensors, however, the rotating speed of one or both of the main spindles sometimes may be subject to small fluctuations from some cause. In this case, a small difference is caused between the position feedback signal associated with one main spindle and the position feedback signal associated with the other main spindle, and hence a difference is caused between positional deviations (speed commands) associated individually to the two main spindles. Therefore, velocity loops of the two main spindles, which are ordinally arranged to carry out both proportional control and integral control so as to produce torque commands in accordance with the speed commands and speed feedback signals, are supplied with input signals which are different from each other due to the difference in speed between the main spindles, e.g., at the start of the workpiece delivery, for example. As a result, a difference is caused between integral term outputs, and hence torque commands, from the two velocity loops after the start of the workpiece delivery, so that the workpiece is twisted.
In the application of the proposed method, particularly, the aforementioned awkward situation, attributable to the difference in speed between the main spindles at the start of the workpiece delivery, is liable to occur noticeably. Namely, if the difference is present between the respective speeds of the main spindles at the start of the workpiece delivery, different position feedback signals are supplied from the two position sensors to the two positional deviation counters, individually, so that different positional deviations are stored individually in the two counters. During the delivery of the workpiece during which the opposite end portions of the workpiece are grasped, since two spindle motors, which are connected through the workpiece to each other, rotate at the same speed, the workpiece rotates without being cleared of the twist caused at the start of the workpiece delivery. During the workpiece delivery, moreover, different speed deviations are respectively integrated by means of the velocity loops of the two main spindles, due to the difference generated at the start of the workpiece delivery between the positional deviation associated with the one main spindle and the position deviation associated with the other main spindle. Thus, during the workpiece delivery, different torque commands are generated individually from the two velocity loops, so that the workpiece is twisted. Moreover, the difference between the two torque commands gradually increases.